import org.trie4j.doublearray.DoubleArray;
        import org.trie4j.louds.TailLOUDSTrie;
        import org.trie4j.patricia.PatriciaTrie;
public class SimpleTrieTest {
    public static void main(String[] args) throws Exception{
        PatriciaTrie pat = new PatriciaTrie();
        pat.insert("Hello");
        pat.insert("World");
        pat.insert("Wonder");
        pat.insert("Wonderful!");
        System.out.println(pat.contains("Hello"));

        Iterable<String> w = pat.predictiveSearch("W");
        w.forEach((item)->{
            System.out.println(item);
        });

        DoubleArray doubleArray= new DoubleArray(pat);
        System.out.println(doubleArray.contains("World"));
    }
}